package com.bestv.utils.common;

import java.util.Random;

/**
 * Created by Henry on 14-7-9.
 */
public class GenerateId {
    private Random random;

    private static GenerateId instance;

    public static synchronized GenerateId getInstance() {
        if (instance == null) {
            instance = new GenerateId();
        }
        return instance;
    }

    private GenerateId() {
        random = new Random();
    }

    public synchronized long getLongRandomId() {
        return random.nextLong();
    }
}
